package main

import "fmt"

var (
	aa = 3
	ss = "kkk"
)

// 变量的零值
func variableZeroValue() {
	var a int
	var s string

	fmt.Printf("%d %q\n", a, s)
}

// 变量初始值
func variableInitValue() {
	var a, b int = 3, 4
	var s string = "Hello, 世界"
	fmt.Println(a, b, s)
}

// 变量类型推断
func variableTypeDeduction() {
	var a, b, c, s = 12, 34, true, "Hello, 世界"

	fmt.Println(a, b, c, s)
}

func variableShorten() {
	a, b, c, s := 12, 34, true, "Hello, 世界"
	b = 56
	fmt.Println(a, b, c, s)
}
func main() {
	variableZeroValue()
	variableInitValue()
	variableTypeDeduction()
	variableShorten()

	fmt.Println(aa, ss)
}
